/*
    SUSAN® - Sole of Unix Save ANything

   

   
*/
#if defined(HAVE_MINGW)
#include "include/susan.h"
#include "gtest/gtest.h"
#else
#include "gtest/gtest.h"
#include "include/susan.h"
#endif

#include "lib/parse_conf.h"
#include "filed/filed_globals.h"
#include "filed/filed_conf.h"

namespace filedaemon {

TEST(ConfigParser, test_filed_config)
{
  OSDependentInit();
  InitMsg(NULL, NULL); /* initialize message handler */

  std::string path_to_config_file = std::string(
      RELATIVE_PROJECT_SOURCE_DIR "/configs/susan-configparser-tests");
  my_config = InitFdConfig(path_to_config_file.c_str(), M_ERROR_TERM);

  ASSERT_TRUE(my_config->ParseConfig());

  my_config->DumpResources(PrintMessage, NULL);

  delete my_config;

  TermMsg();         /* Terminate message handler */
  CloseMemoryPool(); /* release free memory in pool */
}

}  // namespace filedaemon
